package com.sendemail;

import com.sendemail.thread.EmailThread;
import com.sendemail.thread.ListenerThread;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SendemailApplication implements CommandLineRunner {

	public static void main(String[] args) {
		SpringApplication.run(SendemailApplication.class, args);
	}

	@Override
	public void run(String... strings) throws Exception {
		EmailThread emailThread = new EmailThread();
		emailThread.start();
		new ListenerThread(emailThread).start();

	}
}
